<!--
 * @Description: 车辆过户审核明细
 * @Autor: 刘诗文
 * @Date: 2020-11-25 16:02:07
 * @LastEditors: 何兴家
 * @LastEditTime: 2021-02-26 15:11:28
-->
<template>
  <div>
    <FilterTable
      ref="table"
      height="500"
      selectionType="single"
      :isSelectColumn="false"
      :columns="columns"
      :dataSource="tableList"
      columnsRef="transferCheckDetaillsw"
      :onColumnsChange="columns => (this.columns = columns)"
    >
    </FilterTable>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
      <el-button @click="closeHandler">关闭</el-button>
    </div>
  </div>
</template>
<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  name: 'transferCheckDetail',
  mixins: [dictionary],
  props: {
    type: {
      type: String
    },
    formData: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      columns: this.createTableColumns(),
      tableList: []
    };
  },
  mounted() {
    this.tableList = this.formData.itemList;
  },
  methods: {
    createTableColumns() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 70,
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },
        {
          title: 'VIN',
          dataIndex: 'vin',
          showOverFlowTooltip: true,
          render: props => {
            return <span>{this.formData.vin}</span>;
          }
        },
        {
          title: '车牌号',
          dataIndex: 'license',
          showOverFlowTooltip: true,
          render: props => {
            return <span>{this.formData.license}</span>;
          }
        },
        {
          title: '审核状态',
          dataIndex: 'checkStatus',
          dictItems: this.createDictList(1261),
          showOverFlowTooltip: true
        },
        {
          title: '审核信息',
          dataIndex: 'checkInfo',
          showOverFlowTooltip: true
        },
        {
          title: '审核人',
          dataIndex: 'checkBy',
          showOverFlowTooltip: true
        },
        {
          title: '审核时间',
          dataIndex: 'checkAt',
          showOverFlowTooltip: true
        }
      ];
    },
    closeHandler() {
      this.$emit('close', false);
    }
  }
};
</script>
<style lang="less" scoped></style>
